<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>演示窗口Window的核心属性</title>
		<style>
			body{
				height: 10000px;
				width: 3999px;
				background: linear-gradient(red,blue,green,gray);
			}
		</style>
		<script>
			function showWin1(){
				alert("窗口大小"+window.outerWidth+"X"+window.outerHeight);
				alert("窗口大小"+window.innerWidth+"X"+window.innerHeight);
				alert("左上角位置："+window.screenLeft+","+window.screenTop);
			}
			function scollToPos(){
				window.scrollTo(1500,3000);
			}
			function gotoJd(){
				alert(window.location);
				window.location="https://www.jd.com";
			}
			function doCloseWin(){
				if(window.confirm("真的要关闭？")){
					window.close();
				}
			}
			function openBdqn(){
				window.open("https://www.bdqn.cn","bdqn总部","height=400px,width=200,left=600px,top=300px,location=0");
			}
		</script>
	</head>
	<body>
		<a href="window2.html">去windows2</a>
		<button type="button" onclick="showWin1()">显示窗口的大小</button>
		<button type="button" onclick="scollToPos()">滚动窗口</button>
		<button type="button" onclick="gotoJd()">去jd</button> 
		<button type="button" onclick="doCloseWin()">关闭窗口</button>
		<button type="button" onclick="openBdqn()">打开bdqn</button>
	</body>
</html>